package com.bjfu.gmms.mapper;

import com.bjfu.gmms.pojo.DisciplineExamInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DisciplineExamMapper {

    // 增加学科-考试映射
    int insertDisciplineExamInfo(DisciplineExamInfo disciplineExamInfo);

    // 根据二级学科ID和考试科目ID删除映射
    int deleteDisciplineExamInfoByIds(@Param("secondaryDisciplineId") String secondaryDisciplineId, @Param("examId") int examId);


    /*// 根据二级学科ID和考试科目ID查询映射
    DisciplineExamMap selectDisciplineExamMapByIds(@Param("secondaryDisciplineId") int secondaryDisciplineId, @Param("examId") int examId);*/
    // 更新学科-考试映射
    int updateDisciplineExamInfo(
            @Param("oldSecondaryDisciplineId") String oldSecondaryDisciplineId,
            @Param("oldExamId") int oldExamId,
            @Param("newSecondaryDisciplineId") String newSecondaryDisciplineId,
            @Param("newExamId") int newExamId
    );

    //根据二级学科ID查询二级学科需要考察的考试科目(返回考试科目号的List)
    List<Integer> selectDisciplineExamInfoBySecondaryDisciplineId(String secondaryDisciplineId);

    //根据考试科目查到其对应的二级学科(返回二级学科号的List)
    List<String> selectDisciplineExamInfoByExamId(int examId);

}
